<?php 
ob_start();
include '../operations/connection.php';

$idmemo == $_REQUEST['idmemo'];
$id_employee = $_REQUEST['idemp'];


$newlang = $_REQUEST['newlang'];

if ($_REQUEST['newlang'] == "EN") {
			include "../value/value_en.php";
		} else if($_REQUEST['newlang'] == "VN") {
			include "../value/value_vn.php";
		}
		else {
			include "../value/value_kr.php";
		}
		
		$sqldelete = "DELETE FROM list_memo where IDMemo ='$idmemo'";
		mysql_query($sqldelete);
		
	$selectprimemo = mysql_query("SELECT IDMemo,Title,DATE_FORMAT(CreatedDate,'%Y-%m-%d') as CreatedDate FROM list_memo WHERE IDEmployee ='$id_employee'");
		
		
?>
<div class="nav_top" style="width: 100%;">
       		<div class="nav_tit"><?php echo $l_menu_privatememo;?></div>     
            <div class="rehome"><a href="mainPhone.php"><?php echo $l_menu?></a></div>       
       	</div>
<div id="board-content" style="padding-top: 20px;">
			<img src="images/line1.png" width="100%" /><br /> <br /> 
			
			<div class="mo"><a href="#" onclick="onclickAddNewPrivate(this);">
			
				<img src="images/new_mo.png" /></a>
			</div>
				<br style="clear:both" /><br />
				<table width="100%" style="border: 1px dotted silver;background-color: white;">
					<tr>
						<th width="5%"  style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;"><?php echo $l_no?></th>
						<th width="60%" style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;"><?php echo $l_title?></th>
						<th width="17%" style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;"><?php echo $l_created_date?></th>
						<th width="21%" style="border-bottom:  1px dotted silver;"></th>
						
					</tr>
					
					<?php $i = 0; 
					 while ($row=mysql_fetch_array($selectprimemo)){
					  $i++ 
					  ;?>
					<tr>
					<td  style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;"><?php echo $i?></td>
					<td style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;">
						<a href="#" onclick="processPreviewPri('<?=$row[IDMemo]?>',this);"><?php echo $row[Title]?></a></td>
					<td style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;"><?php echo $row[CreatedDate]?></td>
					<td style="border-right:  1px dotted silver;border-bottom:  1px dotted silver;text-align: center;">
							
							<a id="preview" href="#"
								onclick="onclickEditPrivateMemo('<?=$row[IDMemo]?>','edit',this);">
								<img src="images/edit-admin.png" /> </a>
							<a id="preview" href="#" 
								onclick="if(confirm('<?php echo $l_confirm_deleteproject?>')){ processDeletePri('<?=$row[IDMemo]?>','<?=$id_employee?>',this); return true;}else{return false;}">
								<img src="images/delete-admin.png" /> </a>
					</td>
					</tr>
					<?php }?>
				</table>
			
		</div>
		<?php mysql_close($connection);?>